From 03716a3d94d78cf6f0c4545104169f71c2738a1c Mon Sep 17 00:00:00 2001 From: Ell Date: Sat, 4 Aug 2018 02:14:29 -0400 Subject: [PATCH] babl-cache: skip fishes with nonexistent conversions, instead of bailing When encountering a nonexistent conversion while loading the fish cache, skip the current fish, instead of stopping processing the cache entirely. --- babl/babl-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/babl/babl-cache.c b/babl/babl-cache.c index 917f028..e85216e 100644 --- a/babl/babl-cache.c +++ b/babl/babl-cache.c @@ -310,13 +310,13 @@ void babl_init_db (void) token2 = strtok_r (NULL, seps2, &tokp2); } } - else if (to_format) + else if (to_format && babl) { Babl *conv = (void*)babl_db_find(babl_conversion_db(), &token[1]); if (!conv) { - free (contents); - return; + babl_free (babl); + babl = NULL; } else babl_list_insert_last (babl->fish_path.conversion_list, conv); -- 2.30.2